import Vue from 'vue'
import Vuex from 'vuex'
import user from './user'
import prosistedstate from 'vuex-persistedstate'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  modules: {
    user
  },
  grtter: {},
  // 数据持久化 储存token
  plugins: [
    prosistedstate({
      key: 'token',
      paths: ['user.token']
    })
  ]
})
